package com.neuedu.heartapi.controller;

import com.neuedu.heartapi.pojo.CardioAge;
import com.neuedu.heartapi.service.CardioAgeService;
import com.neuedu.heartapi.util.ResponseBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class CardioAgeController {
    @Autowired
    private CardioAgeService cardioAgeService;
    @GetMapping("/queryAllCardioAge")
    public ResponseBody<List<CardioAge>> queryAllCardioAge(){
        List<CardioAge> cardioAges = cardioAgeService.queryAllCardioAge();
        ResponseBody responseBody = new ResponseBody("200","成功",cardioAges);
        return responseBody;
    }
}
